package cn.tedu.spring.life;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestLife {
    public static void main(String[] args) {
        /*
            1.实例化阶段[调用无参构造方法]
            3.初始化阶段[调用@PostConstruct注解的方法]
         */
        AnnotationConfigApplicationContext  context = new AnnotationConfigApplicationContext("cn.tedu.spring.life");
        Life life= context.getBean(Life.class);
        System.out.println("4.开发者使用阶段");
        //关闭IoC容器
        context.close();
    }
}
